package com.hzdl.car.util;

public class HzdlResultJson {
   private Integer code=0;
   private  String msg;
    private Long count;

    @Override
    public String toString() {
        return "HzdlResultJson{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", count=" + count +
                ", data=" + data +
                '}';
    }

    private  Object data;


    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public HzdlResultJson(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public HzdlResultJson(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public HzdlResultJson() {
    }

    public HzdlResultJson(String msg, Object data) {
        this.msg = msg;
        this.data = data;
    }

    public HzdlResultJson( String msg, Object data, Long count) {
        this.msg = msg;
        this.data = data;
        this.count = count;
    }

    public static HzdlResultJson ok(Object data){
        return new HzdlResultJson("ok",data);
    }
    public static HzdlResultJson ok(Long count,Object data){
        return new HzdlResultJson("",data,count);
    }
    public static HzdlResultJson error(Integer code,String msg){
        return new HzdlResultJson(code,msg);
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
